/**
 * @this RXFormTextItem: form 文本控件
 *
 * @flow
 */
import React, { Component } from 'react'

import RXFormSelectItem from './RXFormSelectItem'

export default class RXFormTextItem extends Component {
  static propTypes = {
    ...RXFormSelectItem.propTypes,
  }

  static defaultProps = {
    ...RXFormSelectItem.defaultProps
  }

  constructor(props) {
    super(props)
  }

  render() {
    const { children, defaultValue, ...other } = this.props
    return (
      <RXFormSelectItem
        {...other}
        defaultValue={defaultValue ? defaultValue : ''}
        accessory={'none'}
      >
      { children }
      </RXFormSelectItem>
    )
  }
}